<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNN: include/Interpreter.hpp 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MNN
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Interpreter.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_interpreter_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//  Interpreter.hpp</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//  MNN</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//  Created by MNN on 2018/07/23.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">//  Copyright © 2018, Alibaba Group Holding Limited</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef Interpreter_hpp</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define Interpreter_hpp</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;map&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_error_code_8hpp.html">ErrorCode.hpp</a>&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_m_n_n_forward_type_8h.html">MNNForwardType.h</a>&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tensor_8hpp.html">Tensor.hpp</a>&quot;</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_m_n_n.html">MNN</a> {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html">   22</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_m_n_n_1_1_schedule_config.html">ScheduleConfig</a> {</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html#a5f00d2cb554129c8b2d65143877e3986">   24</a></span>&#160;    std::vector&lt;std::string&gt; <a class="code" href="struct_m_n_n_1_1_schedule_config.html#a5f00d2cb554129c8b2d65143877e3986">saveTensors</a>;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html#a35f7e7256c50535c5032c1b481a12f67">   26</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870">MNNForwardType</a> <a class="code" href="struct_m_n_n_1_1_schedule_config.html#a35f7e7256c50535c5032c1b481a12f67">type</a> = <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7">MNN_FORWARD_CPU</a>;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html#a39f535044bb3278926feb6a897eb258a">   28</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="struct_m_n_n_1_1_schedule_config.html#a39f535044bb3278926feb6a897eb258a">numThread</a> = 4;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html">   31</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html">Path</a> {</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#af075d20afe00be51f03fe1a75b01bf8b">   32</a></span>&#160;        std::vector&lt;std::string&gt; <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#af075d20afe00be51f03fe1a75b01bf8b">inputs</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a296fc7817328f9ae8a35522579ec5a1d">   33</a></span>&#160;        std::vector&lt;std::string&gt; <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a296fc7817328f9ae8a35522579ec5a1d">outputs</a>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1">   35</a></span>&#160;        <span class="keyword">enum</span> <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1">Mode</a> {</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1a8c240077a59ee39cc2ec707d9f3f5f58">   43</a></span>&#160;            <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1a8c240077a59ee39cc2ec707d9f3f5f58">Op</a> = 0,</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1a7249a4a910822d82c24a32b44c52b5a0">   51</a></span>&#160;            <a class="code" href="class_m_n_n_1_1_tensor.html">Tensor</a> = 1</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        };</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#aaaea77926845ebbe8848f7c34303bb99">   55</a></span>&#160;        <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1">Mode</a> <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#aaaea77926845ebbe8848f7c34303bb99">mode</a> = <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1a8c240077a59ee39cc2ec707d9f3f5f58">Op</a>;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    };</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html#a5103f3ed350c25b80a8d38cfb31dd18e">   57</a></span>&#160;    <a class="code" href="struct_m_n_n_1_1_schedule_config_1_1_path.html">Path</a> <a class="code" href="struct_m_n_n_1_1_schedule_config.html#a5103f3ed350c25b80a8d38cfb31dd18e">path</a>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html#a1bbd4d82e5a382001461ea044dbbff83">   60</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870">MNNForwardType</a> <a class="code" href="struct_m_n_n_1_1_schedule_config.html#a1bbd4d82e5a382001461ea044dbbff83">backupType</a> = <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7">MNN_FORWARD_CPU</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_schedule_config.html#ac8020cf2bbf4a10833cebf7ead772497">   63</a></span>&#160;    BackendConfig* <a class="code" href="struct_m_n_n_1_1_schedule_config.html#ac8020cf2bbf4a10833cebf7ead772497">backendConfig</a> = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;};</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">class </span>Session;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="keyword">struct </span>Content;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">class </span><a class="code" href="class_m_n_n_1_1_tensor.html">Tensor</a>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="keyword">class </span>Backend;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_m_n_n_1_1_operator_info.html">   71</a></span>&#160;<span class="keyword">class </span><a class="code" href="_m_n_n_define_8h.html#a692428e2a0af8ffb79376d223a0695ab">MNN_PUBLIC</a> <a class="code" href="class_m_n_n_1_1_operator_info.html">OperatorInfo</a> {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keyword">struct </span>Info;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keyword">const</span> std::string&amp; name() <span class="keyword">const</span>;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">const</span> std::string&amp; type() <span class="keyword">const</span>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordtype">float</span> flops() <span class="keyword">const</span>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <a class="code" href="class_m_n_n_1_1_operator_info.html">OperatorInfo</a>();</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    ~<a class="code" href="class_m_n_n_1_1_operator_info.html">OperatorInfo</a>();</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="class_m_n_n_1_1_operator_info.html#a56dd2ac69a21fb22916a70aa3614c443">   87</a></span>&#160;    Info* <a class="code" href="class_m_n_n_1_1_operator_info.html#a56dd2ac69a21fb22916a70aa3614c443">mContent</a>;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;};</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="namespace_m_n_n.html#a1f91a5f4dc548c75fe13aaa13cc04009">   90</a></span>&#160;<span class="keyword">typedef</span> std::function&lt;bool(<span class="keyword">const</span> std::vector&lt;Tensor*&gt;&amp;, <span class="keyword">const</span> std::string&amp; <span class="comment">/*opName*/</span>)&gt; <a class="code" href="namespace_m_n_n.html#a1f91a5f4dc548c75fe13aaa13cc04009">TensorCallBack</a>;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="namespace_m_n_n.html#af7117272fc9d890dfb66436435c61811">   91</a></span>&#160;<span class="keyword">typedef</span> std::function&lt;bool(<span class="keyword">const</span> std::vector&lt;Tensor*&gt;&amp;, <span class="keyword">const</span> <a class="code" href="class_m_n_n_1_1_operator_info.html">OperatorInfo</a>*)&gt; <a class="code" href="namespace_m_n_n.html#af7117272fc9d890dfb66436435c61811">TensorCallBackWithInfo</a>;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="class_m_n_n_1_1_interpreter.html">   94</a></span>&#160;<span class="keyword">class </span><a class="code" href="_m_n_n_define_8h.html#a692428e2a0af8ffb79376d223a0695ab">MNN_PUBLIC</a> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a> {</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>* createFromFile(<span class="keyword">const</span> <span class="keywordtype">char</span>* file);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>* createFromBuffer(<span class="keyword">const</span> <span class="keywordtype">void</span>* buffer, <span class="keywordtype">size_t</span> size);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    ~<a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>();</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    Session* createSession(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_schedule_config.html">ScheduleConfig</a>&amp; config);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    Session* createMultiPathSession(<span class="keyword">const</span> std::vector&lt;ScheduleConfig&gt;&amp; configs);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordtype">bool</span> releaseSession(Session* session);</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keywordtype">void</span> resizeSession(Session* session);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordtype">void</span> releaseModel();</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <a class="code" href="namespace_m_n_n.html#a6814f7688a6a1ba4245f3ec5f4773241">ErrorCode</a> runSession(Session* session) <span class="keyword">const</span>;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="comment">/*</span></div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="comment">     * @brief run session.</span></div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<span class="comment">     * @param session   given session.</span></div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="comment">     * @param before    callback before each op. return true to run the op; return false to skip the op.</span></div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="comment">     * @param after     callback after each op. return true to continue running; return false to interrupt the session.</span></div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="comment">     * @param sync      synchronously wait for finish of execution or not.</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;<span class="comment">     * @return result of running.</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="comment">     */</span></div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="namespace_m_n_n.html#a6814f7688a6a1ba4245f3ec5f4773241">ErrorCode</a> runSessionWithCallBack(<span class="keyword">const</span> Session* session, <span class="keyword">const</span> <a class="code" href="namespace_m_n_n.html#a1f91a5f4dc548c75fe13aaa13cc04009">TensorCallBack</a>&amp; before, <span class="keyword">const</span> <a class="code" href="namespace_m_n_n.html#a1f91a5f4dc548c75fe13aaa13cc04009">TensorCallBack</a>&amp; end,</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                                     <span class="keywordtype">bool</span> sync = <span class="keyword">false</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="comment">/*</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="comment">     * @brief run session.</span></div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">     * @param session   given session.</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment">     * @param before    callback before each op. return true to run the op; return false to skip the op.</span></div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="comment">     * @param after     callback after each op. return true to continue running; return false to interrupt the session.</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment">     * @param sync      synchronously wait for finish of execution or not.</span></div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="comment">     * @return result of running.</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="comment">     */</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <a class="code" href="namespace_m_n_n.html#a6814f7688a6a1ba4245f3ec5f4773241">ErrorCode</a> runSessionWithCallBackInfo(<span class="keyword">const</span> Session* session, <span class="keyword">const</span> <a class="code" href="namespace_m_n_n.html#af7117272fc9d890dfb66436435c61811">TensorCallBackWithInfo</a>&amp; before,</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                                         <span class="keyword">const</span> <a class="code" href="namespace_m_n_n.html#af7117272fc9d890dfb66436435c61811">TensorCallBackWithInfo</a>&amp; end, <span class="keywordtype">bool</span> sync = <span class="keyword">false</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <a class="code" href="class_m_n_n_1_1_tensor.html">Tensor</a>* getSessionInput(<span class="keyword">const</span> Session* session, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <a class="code" href="class_m_n_n_1_1_tensor.html">Tensor</a>* getSessionOutput(<span class="keyword">const</span> Session* session, <span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keyword">const</span> std::map&lt;std::string, Tensor*&gt;&amp; getSessionOutputAll(<span class="keyword">const</span> Session* session) <span class="keyword">const</span>;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keyword">const</span> std::map&lt;std::string, Tensor*&gt;&amp; getSessionInputAll(<span class="keyword">const</span> Session* session) <span class="keyword">const</span>;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordtype">void</span> resizeTensor(<a class="code" href="class_m_n_n_1_1_tensor.html">Tensor</a>* tensor, <span class="keyword">const</span> std::vector&lt;int&gt;&amp; dims);</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keyword">const</span> Backend* getBackend(<span class="keyword">const</span> Session* session, <span class="keyword">const</span> <a class="code" href="class_m_n_n_1_1_tensor.html">Tensor</a>* tensor) <span class="keyword">const</span>;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* bizCode() <span class="keyword">const</span>;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    <span class="keyword">static</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>* createFromBufferInternal(Content* net);</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    Content* mNet = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>(Content* net);</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>(<span class="keyword">const</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>&amp;)  = <span class="keyword">delete</span>;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>(<span class="keyword">const</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>&amp;&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="class_m_n_n_1_1_interpreter.html">Interpreter</a>&amp;&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;};</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;} <span class="comment">// namespace MNN</span></div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* Interpreter_hpp */</span><span class="preprocessor"></span></div><div class="ttc" id="struct_m_n_n_1_1_schedule_config_1_1_path_html_a481420d0964e54a95397b3142b0f3dd1"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1">MNN::ScheduleConfig::Path::Mode</a></div><div class="ttdeci">Mode</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:35</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870">MNNForwardType</a></div><div class="ttdeci">MNNForwardType</div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:12</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html_a5f00d2cb554129c8b2d65143877e3986"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html#a5f00d2cb554129c8b2d65143877e3986">MNN::ScheduleConfig::saveTensors</a></div><div class="ttdeci">std::vector&lt; std::string &gt; saveTensors</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:24</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html_a1bbd4d82e5a382001461ea044dbbff83"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html#a1bbd4d82e5a382001461ea044dbbff83">MNN::ScheduleConfig::backupType</a></div><div class="ttdeci">MNNForwardType backupType</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:60</div></div>
<div class="ttc" id="_error_code_8hpp_html"><div class="ttname"><a href="_error_code_8hpp.html">ErrorCode.hpp</a></div></div>
<div class="ttc" id="class_m_n_n_1_1_operator_info_html_a56dd2ac69a21fb22916a70aa3614c443"><div class="ttname"><a href="class_m_n_n_1_1_operator_info.html#a56dd2ac69a21fb22916a70aa3614c443">MNN::OperatorInfo::mContent</a></div><div class="ttdeci">Info * mContent</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:87</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html_a35f7e7256c50535c5032c1b481a12f67"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html#a35f7e7256c50535c5032c1b481a12f67">MNN::ScheduleConfig::type</a></div><div class="ttdeci">MNNForwardType type</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:26</div></div>
<div class="ttc" id="class_m_n_n_1_1_operator_info_html"><div class="ttname"><a href="class_m_n_n_1_1_operator_info.html">MNN::OperatorInfo</a></div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:71</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_1_1_path_html_a481420d0964e54a95397b3142b0f3dd1a8c240077a59ee39cc2ec707d9f3f5f58"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a481420d0964e54a95397b3142b0f3dd1a8c240077a59ee39cc2ec707d9f3f5f58">MNN::ScheduleConfig::Path::Op</a></div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:43</div></div>
<div class="ttc" id="class_m_n_n_1_1_tensor_html"><div class="ttname"><a href="class_m_n_n_1_1_tensor.html">MNN::Tensor</a></div><div class="ttdef"><b>Definition:</b> Tensor.hpp:25</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_1_1_path_html"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config_1_1_path.html">MNN::ScheduleConfig::Path</a></div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:31</div></div>
<div class="ttc" id="_m_n_n_define_8h_html_a692428e2a0af8ffb79376d223a0695ab"><div class="ttname"><a href="_m_n_n_define_8h.html#a692428e2a0af8ffb79376d223a0695ab">MNN_PUBLIC</a></div><div class="ttdeci">#define MNN_PUBLIC</div><div class="ttdef"><b>Definition:</b> MNNDefine.h:53</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html">MNN::ScheduleConfig</a></div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:22</div></div>
<div class="ttc" id="class_m_n_n_1_1_interpreter_html"><div class="ttname"><a href="class_m_n_n_1_1_interpreter.html">MNN::Interpreter</a></div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:94</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7">MNN_FORWARD_CPU</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:13</div></div>
<div class="ttc" id="namespace_m_n_n_html_af7117272fc9d890dfb66436435c61811"><div class="ttname"><a href="namespace_m_n_n.html#af7117272fc9d890dfb66436435c61811">MNN::TensorCallBackWithInfo</a></div><div class="ttdeci">std::function&lt; bool(const std::vector&lt; Tensor * &gt; &amp;, const OperatorInfo *)&gt; TensorCallBackWithInfo</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:91</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html_ac8020cf2bbf4a10833cebf7ead772497"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html#ac8020cf2bbf4a10833cebf7ead772497">MNN::ScheduleConfig::backendConfig</a></div><div class="ttdeci">BackendConfig * backendConfig</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:63</div></div>
<div class="ttc" id="namespace_m_n_n_html"><div class="ttname"><a href="namespace_m_n_n.html">MNN</a></div><div class="ttdef"><b>Definition:</b> AutoTime.hpp:16</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html_a39f535044bb3278926feb6a897eb258a"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html#a39f535044bb3278926feb6a897eb258a">MNN::ScheduleConfig::numThread</a></div><div class="ttdeci">int numThread</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:28</div></div>
<div class="ttc" id="_tensor_8hpp_html"><div class="ttname"><a href="_tensor_8hpp.html">Tensor.hpp</a></div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_html_a5103f3ed350c25b80a8d38cfb31dd18e"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config.html#a5103f3ed350c25b80a8d38cfb31dd18e">MNN::ScheduleConfig::path</a></div><div class="ttdeci">Path path</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:57</div></div>
<div class="ttc" id="namespace_m_n_n_html_a6814f7688a6a1ba4245f3ec5f4773241"><div class="ttname"><a href="namespace_m_n_n.html#a6814f7688a6a1ba4245f3ec5f4773241">MNN::ErrorCode</a></div><div class="ttdeci">ErrorCode</div><div class="ttdef"><b>Definition:</b> ErrorCode.hpp:13</div></div>
<div class="ttc" id="namespace_m_n_n_html_a1f91a5f4dc548c75fe13aaa13cc04009"><div class="ttname"><a href="namespace_m_n_n.html#a1f91a5f4dc548c75fe13aaa13cc04009">MNN::TensorCallBack</a></div><div class="ttdeci">std::function&lt; bool(const std::vector&lt; Tensor * &gt; &amp;, const std::string &amp;)&gt; TensorCallBack</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:90</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_1_1_path_html_af075d20afe00be51f03fe1a75b01bf8b"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config_1_1_path.html#af075d20afe00be51f03fe1a75b01bf8b">MNN::ScheduleConfig::Path::inputs</a></div><div class="ttdeci">std::vector&lt; std::string &gt; inputs</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:32</div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_1_1_path_html_aaaea77926845ebbe8848f7c34303bb99"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config_1_1_path.html#aaaea77926845ebbe8848f7c34303bb99">MNN::ScheduleConfig::Path::mode</a></div><div class="ttdeci">Mode mode</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:55</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html"><div class="ttname"><a href="_m_n_n_forward_type_8h.html">MNNForwardType.h</a></div></div>
<div class="ttc" id="struct_m_n_n_1_1_schedule_config_1_1_path_html_a296fc7817328f9ae8a35522579ec5a1d"><div class="ttname"><a href="struct_m_n_n_1_1_schedule_config_1_1_path.html#a296fc7817328f9ae8a35522579ec5a1d">MNN::ScheduleConfig::Path::outputs</a></div><div class="ttdeci">std::vector&lt; std::string &gt; outputs</div><div class="ttdef"><b>Definition:</b> Interpreter.hpp:33</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
